import { FilterConfig, BaseTreeNode } from '../core/api';

export interface FilterItem {
  key: any;
  label: string;
  value: any;
  selected?: boolean;
  disabled?: boolean;
}
export interface TableFilterConfig extends FilterConfig {
  customFilter?: <T>(data: T[] | null, filter: TableFilterConfig) => T[] | null;
  customItemFilter?: <T>(data: T | null, filter: TableFilterConfig) => boolean;
}

export interface RowCheckFactor {
  key: 'td' | 'th';
  check?: boolean;
  halfCheck?: boolean;
}

export interface TreeTableNode extends BaseTreeNode {
  children?: TreeTableNode[];
}

export type ContentScrollType = 0 | 1 | 2; // 左中右

export type ResizeType = 'fit' | 'expand';

export enum CheckTypeEnum {
  SINGLE = 0,
  All = 1,
}
